package com.leen.video.entity;


import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 七牛云文件存储
 * </p>
 *
 * @author yy
 * @since 2021-05-19
 */
@Entity
@Setter
@Getter
@Table(name = "qiniu_content")
@ToString(callSuper = true)
@ApiModel(value="QiniuContent对象", description="七牛云文件存储")
public class QiniuContent implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    @ApiModelProperty(value = "Bucket 识别符")
    @Column(name = "bucket")
    private String bucket;

    @ApiModelProperty(value = "文件名称")
    @Column(name = "name")
    private String name;

    @ApiModelProperty(value = "文件大小")
    @Column(name = "size")
    private String size;

    @ApiModelProperty(value = "文件类型：私有或公开")
    @Column(name = "type")
    private String type;


    @DateTimeFormat(pattern = "yyyy/MM/dd HH:mm:ss")
    @JSONField(format = "yyyy/MM/dd HH:mm:ss")
    @ApiModelProperty(value = "上传或同步的时间")
    @Column(name = "update_time")
    private Date updateTime;

    @ApiModelProperty(value = "文件url")
    @Column(name = "url")
    private String url;

    @Column(name = "suffix")
    private String suffix;


}
